package com.gas.gm.dao;

import java.util.List;

import org.springframework.stereotype.Repository;

import com.gas.gm.model.Account;

@Repository("accountDao")
public class AccountJPADao extends GasApplicationDao<Account> implements AccountDao {

	@SuppressWarnings("unchecked")
	public List<Account> findAllAccounts() {
		return entityManager.createQuery("select a from Account a").getResultList();
	}

	public Account findAccount(String id) {
		return entityManager.find(Account.class, id);
	}

	

}
